#ifndef _HAL_PHYSICALMEMORYMANAGER_H_
#define	_HAL_PHYSICALMEMORYMANAGER_H_

#include <Multiboot2.h>
#include <Hal/PmBitmap.h>

namespace Hal
{
	class PhysicalMemoryManager
	{
	public:
		static void Init(uintptr_t bitmap);
		static void ParseMMapsHigh();
		static uintptr_t Allocate(uintptr_t base = 0);
		
	private:
		static void CheckApproximation();

		static PmBitmap bmp;
		static uint64_t TotalPages, FreePages;
		static uintptr_t NextFreeApproximation;
	};
}

#endif
